package ch8recursion;

public class Ex1 {

	public static int fibonacci(int n) {
		if (n == 0) {
			return 0;
		}
		else if (n == 1) {
			return 1;
		}
		else if (n > 1) {
			return fibonacci(n-1) + fibonacci(n-2);
		}
		else {
			return Integer.MIN_VALUE;
		}
	}
	

}
